<%@ page language="java" contentType="text/html; charset=UTF-8"

         pageEncoding="UTF-8"%>

<%@taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>登录</title>

</head>

<script type="text/javascript">

    function update(id){

        window.location.href="getByIdAction?user.id="+id;

    }

</script>

<body>

<center>

    <table>

        <tr><td>顺序</td><td>id</td><td>用户名</td><td>密码</td><td>年龄</td></tr>

        <s:iterator value="list" status="st">

            <tr>

                <td><s:property value="#st.index"/></td>

                <td><s:property value="id" /></td>

                <td><s:property value="username" /></td>

                <td><s:property value="password" /></td>

                <td><s:property value="age" /></td>

                <td><button onclick='update(<s:property value="id" />)'>修改</button></td>

                <td><button onclick='delete(<s:property value="id" />)'>删除</button></td>

            </tr>

        </s:iterator>

    </table>

</center>

</body>

</html>